import plugin from '../../lib/plugins/plugin.js'
import {
    segment
}
    from 'oicq'
import fetch from "node-fetch";

let url = ""

export class tokiDokiSJT extends plugin {
    constructor() {
        super({
            /** 功能名称 */
            name: 'zcx-随机图',
            /** 功能描述 */
            dsc: '',
            event: 'message',
            priority: 1145,
            rule: [
                {
                    reg: "^#随机图$",
                    fnc: 'sjt'
                }
            ]

        })
    }

    async sjt(e) {
        url = `http://tfkapi.top/API/setu_pic.php?return=json/img`;
        await e.reply(segment.image(url))
    }
}